Lecture 5 : Dynamic Programming

نویسنده

  • Weiyao Wang
چکیده

2 Knapsack Problem (continued) 2.1 Algorithm Recap Definition: We define states (sub-problems) as the following: the maximum value for a knapsack with capacity j and we are given the first i items. Then, we have ∀i, j, the corresponding state, a[i, j] is max(a[i−1, j−wi] + vi, a[i−1, j]), where the first option is the value if item i is in the knapsack and the second option is the value if item i is not in the knapsack.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Course : Model , Learning , and Inference : Lecture 5

Probability distributions on structured representation. Dynamic Programming. Learning with EM. NOTE: NOT FOR DISTRIBUTION!!

متن کامل

Lecture Notes on Dynamic Programming 15-122: Principles of Imperative Computation

In this lecture we introduce dynamic programming, which is a high-level computational thinking concept rather than a concrete algorithm. Perhaps a more descriptive title for the lecture would be sharing, because dynamic programming is about sharing computation. We have already seen earlier that sharing of space is also crucial: binary decision diagrams in which subtrees are shared are (in pract...

متن کامل

CMSC 451 Dave Mount CMSC 451 : Lecture 10 Dynamic Programming : Weighted Interval Scheduling

Dynamic Programming: In this lecture we begin our coverage of an important algorithm design technique, called dynamic programming (or DP for short). The technique is among the most powerful for designing algorithms for optimization problems. Dynamic programming is a powerful technique for solving optimization problems that have certain well-defined clean structural properties. (The meaning of t...

متن کامل

CS 262 Lecture 3 Scribe Notes Linear Space Alignment

One of the most basic genetic sequence analysis tasks is to ask if two sequences are related. In the previous lecture, we explored several algorithms for finding optimal sequence alignments, including dynamic programming variants. One of the major computational resources that can limit dynamic programming algorithms is memory usage. In this lecture, we will explore variants of the previously pr...

متن کامل

Lecture Notes on Programs and Contracts

This lecture advances our understanding considerably beyond propositional logic by marching right ahead to understand programs. Our programming language of choice will be an imperative core language with the most important imperative features such as assignments, if-then-else, sequential composition, and while loops. This setting is concrete but simple enough to enable a comprehensive treatment...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2017